package com.engc.common.utils;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Constant {
	public static String VALIDATE_CODE_SESS = "validate_code";
	public static String SYS_USER_INFO = "SysUserInfo";
	public static final int MD5_PWD_BYTE_LEN = 32;
	
	
	//有效，无效
	public static final int VALID_YES = 1;//有效
	public static final int VALID_NO= 0;//无效
	
	//nodepath
	public static final int SCHOOL_NODEPATH = 2;
	public static final int GRADE_NODEPATH = 3;
	public static final int CLASS_NODEPATH = 4;
	public static final int DEPT_TOP_NODEPATH = 10;//部门开始nodepath
	
	//fatherorgid
	public static final int SCHOOL_FATHERORGID = 100000;
	
	public static final String DEFAULTPSW = "000000";//默认密码 
	public static final String PIC_SUFFIX = ".jpg";//图片后缀
	public static final String PIC_PREFIX = "uploadpic/";//图片地址前缀
	public static final String PIC_DEFAULT = "noPhoto.jpg";//默认图片名称
	public static final String PIC_FLODER_STUDENT = "student";//学生文件夹名称
	public static final String PIC_FLODER_TEACHER = "teacher";//教师文件夹名称
	
	//用户类型
	public static final String ISMGR_PLATFORM = "0";//平台用户
	public static final String ISMGR_SCHOOL = "1";//学校用户
	public static final String ISMGR_EDU = "2";//教育局用户
	public static final String ISMGR_COMM = "3";//社区用户
	
	
	
	//组织机构长度
	public static final int AREA_ORGID_LENGTH = 2;//区域
	public static final int SCHOOL_ORGID_LENGTH = 6;//学校
	public static final int GRADE_ORGID_LENGTH = 11;//年级和部门
	public static final int CLASS_ORGID_LENGTH = 18;//班级
	
	//信息增量标识
	public static final int INC_OPERTYPE_ADD = 0;// 增加
	public static final int INC_OPERTYPE_UPDATE = 1;// 更新
	public static final int INC_OPERTYPE_DEL = 2;// 删除
	
	//账户注销金额状态
	public static final String LOGOUT_MONEY_STATUS_PAYED = "1";//已取款
	public static final String LOGOUT_MONEY_STATUS_UNPAYED = "2";//未取款
	//账户注销操作类型
	public static final String LOGOUT_OPERATE_TYPE_GRADUATE = "1";//转出
	public static final String LOGOUT_OPERATE_TYPE_EXCHANGE = "2";//转学
	
	//毕业操作类型
	public static final String GRADUATE_OPER_TYPE_SHOUDONG = "1";//手动
	public static final String GRADUATE_OPER_TYPE_ZIDONG = "2";//自动	
	
	
	/****************************** 用户状态 ********************************/
	// 未开户
	public static final int USERSTATUS_NOT_OPEN_ACCOUNT = 2;
	public static final String USERSTATUS_NOT_OPEN_ACCOUNT_CN = "未开户";
	// 已开户未发卡
	public static final int USERSTATUS_OPEN_ACCOUNT = 3;
	public static final String USERSTATUS_OPEN_ACCOUNT_CN = "开户未发卡";
	// 已发卡
	public static final int USERSTATUS_ALLOCATE_CARD = 7;
	public static final String USERSTATUS_ALLOCATE_CARD_CN = "已发卡";
	// 已注销
	public static final int USERSTATUS_LOGOUT = 15;
	public static final String USERSTATUS_LOGOUT_CN = "已注销";
	// 已毕业
	public static final int USERSTATUS_GRADUATE = 16;
	public static final String USERSTATUS_GRADUATE_CN = "已毕业";
	
	
	/********************************* 卡状态 ************************************/

	// 未发卡
	public static final int CARDSTATUS_NOT_ALLOCATE = -1;
	public static final String CARDSTATUS_NOT_ALLOCATE_CN = "未发卡";

	// 正常
	public static final int CARDSTATUS_NORMAL = 1;
	public static final String CARDSTATUS_NORMAL_CN = "正常";

	// 已挂失
	public static final int CARDSTATUS_REGIST_LOSS = 2;
	public static final String CARDSTATUS_REGIST_LOSS_CN = "挂失";

	public static final int CARDSTATUS_OVERDRAFT_FREEZE = 6;
	public static final String CARDSTATUS_OVERDRAFT_FREEZE_CN = "透支冻结";

	// 已冻结
	public static final int CARDSTATUS_FREEZE = 7;
	public static final String CARDSTATUS_RREEZE_CN = "冻结";

	// 已注销
	public static final int CARDSTATUS_LOGOUT = 8;
	public static final String CARDSTATUS_LOGOUT_CN = "已注销";
	// 已登记注销
	public static final int CARDSTATUS_REGIST_LOGOUT = 9;
	public static final String CARDSTATUS_REGIST_LOGOUT_CN = "已登记注销";

	// 已登记注销
	public static final int CARDSTATUS_GRADUATE = 16;
	public static final String CARDSTATUS_GRADUATE_CN = "已毕业";// (白名单下发挂失状态)
	

	/***************************************************************/
	
	
	//学生报到注册审核状态
	public static final int UNAUDITED = 0;//未审核
	public static final int AUDITED_YES= 1;//审核通过
	public static final int AUDITED_NO = 2;//审核不通过
	public static final int AUDITED_DELETE = 3;//删除
	
	//生成账户调用类别
	public static final String ROLE_STUDENTADMIN = "1";  //学生录入账户
	public static final String ROLE_TEACHERADMIN = "2";  //教师录入账户
	public static final String ROLE_BZRADMIN = "3";      //班主任账户
	public static final String ROLE_GRADEADMIN = "4";    //年级主任账户
	public static final String ROLE_SCHOOLADMIN = "5";   //学校管理员账户
	public static final String ROLE_EKTADMIN = "6";      //超级管理员
	
	//账户类型
	public static final String ACCOUNT_VITUAL_TYPE = "0";//虚拟账户
	public static final String ACCOUNT_ACTUAL_TYPE = "1";//实际用户
	public static final String ACCOUNT_TEMP_TYPE = "2";//临时用户
	
	
	
	//用户锁定将屏蔽的菜单menono
	public static List<String> LOCK_MENU_LIST = new ArrayList<String>();
	static{
		LOCK_MENU_LIST.add("student_personal_entry");//个人信息录入
		LOCK_MENU_LIST.add("student_entry");         //学生信息录入
		LOCK_MENU_LIST.add("student_imp");           //学生数据批量导入
		
		LOCK_MENU_LIST.add("InformationInput_entry");//	教职工信息录入
		LOCK_MENU_LIST.add("BacthImportWeb");		 //	教职工信息批量导入
		LOCK_MENU_LIST.add("teacherInputSelf");		 //	教职工个人录入
	}
	
	
	
	//账户状态
	public static final String ROLE_STATUS_OPEN = "1" ; //账户开放
	public static final String ROLE_STATUS_LOCK = "0" ; //账户锁定
	
	/**
	 * 生成学校的时候默认生成的部门
	 */
	public static final String DEPT_DEFAULT_NAME = "教职工";
	
	/**
	 * 日志操作类型
	 */
	public static final int LOG_TYPE_ADD = 1;  //新增
	public static final int LOG_TYPE_UPDATE= 2; //修改
	public static final int LOG_TYPE_DELETE = 3; //删除
	public static final int LOG_TYPE_LOGIN = 4; //登录
	public static final int LOG_TYPE_AUDIT  = 5; //审核
	public static final int LOG_TYPE_UPLOAD = 6; //上传
	public static final int LOG_TYPE_GRADUATE = 7; //毕业
	public static final int LOG_TYPE_UPGRADE = 8; //升级
	
	//学生学籍默认状态
	public static final String XJZT_ZAIJI = "1";//学生学籍默认状态 -在籍
	public static final String XJZT_ZHUANGCHU = "7";//学生学籍默认状态 -在籍
	
	
	
	
	
	// 系统订购期限
	public static final String EXPIRED_DATE = "29991231";
	
	
	/**
	 * 角色是否默认字段
	 */
	public static final Integer DEFAULT_ROLE_TAG_YES = 0;   //默认
	public static final Integer DEFAULT_ROLE_TAG_NO = 1;    //非默认
	
	public static final String DESKSYSTEMID = "S20";
	public static final String ROLESYSTEMID = "S21";
	public static final String BASESYSTEMID = "S22";
	public static final String CARDSYSTEMID = "S30";
	public static final String CARDCONFSYSTEMID = "S31";
	public static final String CARDRPTSYSTEMID = "S32";
	public static final List<String> NOT_DATAROLE_SYSTEM = new ArrayList<String>();// 不走数据权限的子系统
	public static final Map<String, List<Integer>> orgdefmenuMap;
	static {
		orgdefmenuMap = new HashMap<String, List<Integer>>();
		orgdefmenuMap.put(DESKSYSTEMID, new ArrayList());
		orgdefmenuMap.put(ROLESYSTEMID, new ArrayList());
		orgdefmenuMap.put(BASESYSTEMID, new ArrayList()); 
		orgdefmenuMap.put(CARDSYSTEMID, new ArrayList());
		orgdefmenuMap.put(CARDCONFSYSTEMID, new ArrayList());
		orgdefmenuMap.put(CARDRPTSYSTEMID, new ArrayList());

		// 查询不根据数据权限的子系统
		NOT_DATAROLE_SYSTEM.add(DESKSYSTEMID);
		NOT_DATAROLE_SYSTEM.add(ROLESYSTEMID);
		NOT_DATAROLE_SYSTEM.add(BASESYSTEMID);
	}
	
	
}
